import 'package:base_lib/index.dart';
import 'dictionary.dart';
import 'dictionary_http.dart';

class DictionaryProvider {
  static Future<ResultBody> getDictionary(
      {systemCode, groupCode, parentDictCode}) {
    return DictionaryHttp.getDictionary(
        systemCode: systemCode,
        groupCode: groupCode,
        parentDictCode: parentDictCode);
  }

  ///获取单次药量
  static Future<ResultBody> getSingleDose() {
    return getDictionary(
        systemCode: DictionarySystemCode.medical,
        groupCode: DictionaryGroupCode.medicalMedicineUnit);
  }

  ///获取给药频率
  static Future<ResultBody> getTreatFrequency() {
    return getDictionary(
        systemCode: DictionarySystemCode.medical,
        groupCode: DictionaryGroupCode.medicalTreatFrequency);
  }

  ///获取给药途径
  static Future<ResultBody> getMedicalTreatRoute() {
    return getDictionary(
        systemCode: DictionarySystemCode.medical,
        groupCode: DictionaryGroupCode.medicalTreatRoute);
  }


  ///获取中药用法
  static Future<ResultBody> getChieseMedicalTreatment() {
    return getDictionary(
        systemCode: DictionarySystemCode.medical,
        groupCode: DictionaryGroupCode.medicalSpecialTreatment);
  }

  ///获取病史一级菜单
  static Future<ResultBody> getSicknessGroup() {
    return getDictionary(
        systemCode: DictionarySystemCode.person,
        groupCode: DictionaryGroupCode.personDocsSickness);
  }

  ///获取病史二级内容
  static Future<ResultBody> getSicknessItem() {
    return getDictionary(
        systemCode: DictionarySystemCode.person,
        groupCode: DictionaryGroupCode.personDocsSickness2);
  }

  ///获取医生职称
  static Future<ResultBody> getTitles() {
    return getDictionary(
        systemCode: DictionarySystemCode.doctor,
        groupCode: DictionaryGroupCode.doctorTitle);
  }

  ///获取医生执照
  static Future<ResultBody> getPractice() {
    return getDictionary(
        systemCode: DictionarySystemCode.doctor,
        groupCode: DictionaryGroupCode.doctorPractice);
  }

  ///获取科室
  static Future<ResultBody> getSection() {
    return getDictionary(
        systemCode: DictionarySystemCode.medical,
        groupCode: DictionaryGroupCode.doctorSection);
  }

  ///获取子科室
  static Future<ResultBody> getSection2(systemCode, parentDictCode) {
    return getDictionary(
        systemCode: systemCode,
        groupCode: DictionaryGroupCode.doctorSection2,
        parentDictCode: parentDictCode);
  }
}
